import fetch from 'common/src/utils/fetch';

/**
 * 根据project查询规则
 */
function getRuleByProject(projectId) {
    return fetch({
        url: `/api/electionservice/electionRule/byProject/${projectId}`,
        method: 'get'
    });
}

function getOpenRules(data) {
    return fetch({
        url: `/api/electionservice/electionRule/ruleParamers`,
        
        method: 'post',
        data
    });
   
   
} 
function getGraduateReElectionRules(){
    return fetch({
        url: `/api/electionservice/electionRule/retakeRuleList?managerDeptId=2`, 
        method: 'get',
    })
}
//查询本研互选规则
function getMutualRule(data){
    return fetch({
        url: `/api/electionservice/electionRule/mutualRuleList`, 
        data,
        method: 'post',
    })
}
export default {
    getRuleByProject: getRuleByProject,
    getOpenRules: getOpenRules,
    getGraduateReElectionRules,
    getMutualRule
};
